
<form class="form-horizontal" role="form">
 
    <div class="col-md-10 col-md-offset-1">
    <div class="panel panel-default">
    <div class="panel-heading text-center">记录发卡信息</div>
    <div class="panel-body">

    <div class="form-group">
        <div class="">
            <label for="inputDate" class="col-xs-2 col-xs-offset-2 control-label">记录类型：</label>
        </div>
        <div class="col-xs-6">
            <label class="radio-inline ">
                <input type="radio" name="inlineRadioOptions" id="inlineRadio1" value="1" ng-model="userinfo.type">拿卡
            </label>
            <label class="radio-inline ">
                <input type="radio" name="inlineRadioOptions" id="inlineRadio1" value="2" ng-model="userinfo.type">退卡
            </label>
            <label class="radio-inline ">
                <input type="radio" name="inlineRadioOptions" id="inlineRadio1" value="3" ng-model="userinfo.type">赠送
            </label>
        </div>
    </div>
    <div class="form-group">
        <div class="">
            <label for="inputDate" class="col-xs-2 col-xs-offset-2 control-label">卡类型：</label>
        </div>
        <div class="col-sm-6">
            <ui-select ng-model="userinfo.card_type" theme="bootstrap" >
                <ui-select-match placeholder="请选择卡类型">
                    {{$select.selected.label}}
                </ui-select-match>
                <ui-select-choices repeat="cardtypelist.value as cardtypelist in cardtypearr | filter: $select.search">
                    <span ng-bind-html="cardtypelist.label | highlight: $select.search"></span>
                </ui-select-choices>
            </ui-select>
        </div>
    </div>
    

    <div class="form-group">
        <div class="">
            <label for="inputDate" class="col-xs-2 col-xs-offset-2 control-label">拿/退卡人姓名：</label>
        </div>
        <div class="col-md-6">
            <select class="form-control" ng-model="searchinfo"  ng-options ="obj as obj.name for obj in objs" ng-change="selection(searchinfo)">
                <option value="">请选择</option>
            </select>
        </div>    
    </div>

    <div class="form-group">
        <div class="">
            <label for="inputDate" class="col-xs-2 col-xs-offset-2 control-label">拿/电话：</label>
        </div>
        <div class="col-md-6">
            <input type="text" class="form-control" id="inputpoolname" placeholder=""
                ng-model="userinfo.mobile"
                >
        </div>    
    </div>

    <div class="form-group">
        <div class="">
            <label for="inputDate" class="col-xs-2 col-xs-offset-2 control-label">机构编码：</label>
        </div>
        <div class="col-md-6">
            <input type="text" class="form-control" id="inputpoolname" placeholder=""
                ng-model="userinfo.company_code"
                >
        </div>    
    </div>

    <div class="form-group">
        <div class="">
            <label for="inputDate" class="col-xs-2 col-xs-offset-2 control-label">号段：</label>
        </div>
        <div class="col-md-3">
            <input type="number" class="form-control" id="inputpoolname" placeholder="起始卡号"
                ng-model="cardinfo.start_card_no">
        </div>

        <div class="col-md-3">
            <input type="number" class="form-control" id="inputpoolname" placeholder="结束卡号"
                ng-model="cardinfo.end_card_no">
        </div>
        <div class="col-md-1">
            <button type="button" class="btn btn-success" ng-click="addCardNum(cardinfo)">添加</button>
        </div>
    </div>
    <div class="panel panel-default col-xs-6 col-xs-offset-4" ng-show="cardsegment.length != '0'">
        <table class="table">
        <tbody>
            <tr ng-repeat="cardsegmentlist in cardsegment">
            <td>{{cardsegmentlist}}</td>
            <td>
                <a ng-click="cardsegmentdel($index, cardsegmentlist)" class="btn pull-right" style="color: red; padding:0px;" >
                    <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
                </a>
            </td>
            </tr>
        </tbody>
        </table>
    </div>

    <div class="form-group">
        <div class="">
            <label for="inputDate" class="col-xs-2 col-xs-offset-2 control-label">拿卡数量：</label>
        </div>
        <div class="col-md-6">
            <p type="text" class="form-control" id="inputpoolname" 
                ng-model="userinfo.num">
                {{totalnum}} </p>
        </div>    
    </div>

    <div class="form-group">
        <div class="">
            <label for="inputDate" class="col-xs-2 col-xs-offset-2 control-label">单价：</label>
        </div>
        <div class="col-md-6">
            <input type="text" class="form-control" id="inputpoolname"
                ng-model="userinfo.unit_price"
                >
        </div>    
    </div>

    <div class="form-group">
        <div class="">
            <label for="inputDate" class="col-xs-2 col-xs-offset-2 control-label">总金额：</label>
        </div>
        <div class="col-md-6">
            <p type="text" class="form-control" id="inputpoolname" 
                ng-model="userinfo.all_price">{{userinfo.unit_price * totalnum}}</p>
        </div>
    </div>
 
    <div class="form-group">
        <div class="">
            <label for="inputDate" class="col-xs-2 col-xs-offset-2 control-label">发放目标：</label>
        </div>
        <div class="col-md-6">
            <input type="text" class="form-control" id="inputpoolname" placeholder=""
                ng-model="userinfo.card_giveout_target"
                >
        </div>    
    </div>
    <div class="form-group">
        <div class="">
            <label for="inputDate" class="col-xs-2 col-xs-offset-2 control-label">是否支付：</label>
        </div>
        <div class="col-sm-2">
            <label class="radio-inline ">
                <input type="radio" name="inlineRadioOptions1" id="inlineRadio2" value="1" ng-model="userinfo.pay_type">是
            </label>
            <label class="radio-inline ">
                <input type="radio" name="inlineRadioOptions1" id="inlineRadio2" value="2" ng-model="userinfo.pay_type">否
            </label>
        </div>
        <div class="col-sm-2" ng-show="userinfo.pay_type == '1'">
            <input type="text" class="form-control" id="inputpoolname" placeholder="实际支付金额"
            ng-model="userinfo.real_pay"
            >
        </div>
    </div>
    <div class="form-group">
        <div class="">
            <label for="inputDate" class="col-xs-2 col-xs-offset-2 control-label">支付说明：</label>
        </div>
        <div class="col-sm-6">
            <textarea class="form-control col-sm-2" cols="30" rows="3" ng-model="userinfo.pay_remark"></textarea>
        </div>
    </div>
    <div class="form-group">
        <div class="">
            <label for="inputDate" class="col-xs-2 col-xs-offset-2 control-label">备注：</label>
        </div>
        <div class="col-sm-6">
            <textarea class="form-control col-sm-2" cols="30" rows="3" ng-model="userinfo.remarks"></textarea>
        </div>
    </div>
    

    <div>
        <button type="button" class="col-md-1 col-md-offset-6 btn btn-primary" ng-click="saveuserinfo()">保存</button>
    </div>

</div>
</div>
</div>

</div>
 


</form>